package jwf.fcgi;

public class FCGXEndRequestBody {
    byte appStatusB3;
    byte appStatusB2;
    byte appStatusB1;
    byte appStatusB0;
    byte protocolStatus;
    byte[] reserved = new byte[3];

    public static byte[] makeEndRequestBody(int appStatus, int protocolStatus) {
	byte[] body = new byte[FCGXConstants.FCGIEndReqBodyLen];
	body[0] = (byte) ((appStatus >> 24) & 0xff);
	body[1] = (byte) ((appStatus >> 16) & 0xff);
	body[2] = (byte) ((appStatus >> 8) & 0xff);
	body[3] = (byte) ((appStatus) & 0xff);
	body[4] = (byte) protocolStatus;
	for (int i = 5; i < 8; i++) {
	    body[i] = 0;
	}
	return body;
    }
}
